package com.clz.hyperit.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GenerationTime;

import com.clz.hyperit.util.IdAnnotationin;
import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * 举报
 * 
 * @author Mr.Chen
 * 
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Entity
@Table(name = "report", catalog = "hyperit")
public class Report {


	@IdAnnotationin
	private Integer id;
	private Integer userDetail_id;
	private Integer goal_id;
	private String reason;
	private Integer type; // 0：文章 1：手记 2：问答 3：博客（用户）
	private String createtime;

	public Report() {
		
	}
	

	public Report(Integer id, String createtime) {
	
		this.id = id;
		this.createtime = createtime;
	}


	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "userdetail_id")
	public Integer getUserDetail_id() {
		return userDetail_id;
	}

	public void setUserDetail_id(Integer userDetail_id) {
		this.userDetail_id = userDetail_id;
	}

	@Column(name = "goal_id")
	public Integer getGoal_id() {
		return goal_id;
	}

	public void setGoal_id(Integer goal_id) {
		this.goal_id = goal_id;
	}

	@Column(name = "reason")
	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	@Column(name = "type")
	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
	@Generated(GenerationTime.INSERT)
	@Column(name = "createtime")
	public String getCreatetime() {
		return createtime;
	}

	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}


	@Override
	public String toString() {
		return "Report [id=" + id + ", userDetail_id=" + userDetail_id
				+ ", goal_id=" + goal_id + ", reason=" + reason + ", type="
				+ type + ", createtime=" + createtime + "]";
	}


	

}
